* Check for missing
list year governmenteffectivenes if missing(governmenteffectiveness)

* Linear interpolation for missing value
ipolate governmenteffectiveness year, gen(GE_interp)

* Replace missing values with interpolated
replace governmenteffectiveness = GE_interp if missing(governmenteffectiveness)

drop GE_interp

* Save the cleaned dataset
save cleaned_wavelet_data.dta, replace